package com.study.mongodbdynamicdatasource.config;

import java.util.List;

/**
 * @Name: PropertyMongoDbFactoryLoader
 * @Description: java类作用描述
 * @Author: yn
 * @CreateDate: 2023/7/20 15:51
 * @Remark: 特殊说明
 * @Version: 1.0
 */
public class PropertyMongoDbFactoryLoader implements IMongoDatabaseFactoryLoader{

	private final MongoListProperties mongoListProperties;

	public PropertyMongoDbFactoryLoader(MongoListProperties mongoListProperties) {
		this.mongoListProperties = mongoListProperties;
	}

	/**
	 * 获取MongoDatabaseFactory
	 *
	 * @return Mongo数据源列表
	 */
	@Override
	public List<MongoList> loadMongoClientDbFactory() {
		return mongoListProperties.getDblist();
	}
}
